package edu.usc.cmb.iRegulome.action;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;

public class MySessionFactoryBean extends AnnotationSessionFactoryBean {
	
	private SessionFactory sessionFactory;


	@Override
	public void afterPropertiesSet() throws Exception {
		
		new Thread(){
			@Override
			public void run() {
				try {
					SessionFactory rawSf = buildSessionFactory();
					sessionFactory = wrapSessionFactoryIfNecessary(rawSf);
					afterSessionFactoryCreation();
				} catch (Exception e) {
				}
			};
		}.start();
	}

}

